
class Person {
    name: string = "张三";
    age: number = 18;
    sex: string = "男";
    
    get fullName() {
        return `${this.name} ${this.age}`;
    }

    set fullName(value: string) {
        const parts = value.split(' ');
        this.name = parts[0];
        this.age = parseInt(parts[1], 10);
    }
}

export default function PersonComponent() {
    const person = new Person();
    
    return (
        <div>
            <div>Name: {person.name}, Age: {person.age}</div>
            <div>Full Name: {person.fullName}</div>
        </div>
    );
}